#ifndef DEVICESETUP_H
#define DEVICESETUP_H

#include <QDialog>
#include <QLabel>
#include "udpsys.h"

namespace Ui {
class DeviceSetup;
}

class DeviceSetup : public QDialog
{
    Q_OBJECT

public:
    int devIndex;
    explicit DeviceSetup(QWidget *parent = nullptr);
    void SetDeviceInfo(struct UdpDevice *udevice, int dev_index);
    void appendInfo(QString info);
    ~DeviceSetup();

signals:
    void startOneOrder(int box_index, QString cmdstr, int timeOuts);
    void startOneOrder_udp(int box_index, QString cmdstr, int timeOUts);

private slots:
    void on_pushButton_refreshMAC_clicked();

    void on_pushButton_setMAC_clicked();

    void on_pushButton_clear_clicked();

    void on_pushButton_readhwrtc_clicked();

    void on_pushButton_sethwrtc_clicked();

    void on_pushButton_setMAC_baseBoard_clicked();

private:
    Ui::DeviceSetup *ui;
    QList<QLabel *> netDevNameList;
    QList<QLabel *> macRawNameList;
    QList<QLabel *> macNewNameList;
    int netDevNums;
    int macAddress[6];
};

#endif // DEVICESETUP_H
